//
//  MyInitiateViewController.m
//  didacar
//
//  Created by Yang Yuexia on 15/12/10.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "MyInitiateViewController.h"
#import "MyInitiateCell.h"

@interface MyInitiateViewController ()<UITableViewDelegate,UITableViewDataSource>



@end

@implementation MyInitiateViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    self.tableView.tableHeaderView = [[UIView alloc] init];
    [self setExtraCellLineHidden:self.tableView];
}

-(void)viewWillAppear:(BOOL)animated{
    
    [self.tableView reloadData];
    [super viewWillAppear:animated];
}

#pragma mark ---- 列表代理 ----
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.resultList.count;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 80;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    MyInitiateCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyInitiateCell"];
    [cell showModel:[self.resultList objectAtIndex:indexPath.row]];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
